package com.cookor.poi.modules.phy.entity;

import com.cookor.poi.common.persistence.DataEntity;
import com.cookor.poi.modules.tenant.entity.TTenant;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import java.util.List;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;

public class TArticle extends DataEntity<TArticle> {
  private static final long serialVersionUID = 1L;
  
  private Integer tenantId;
  
  private Integer type;
  
  private String title;
  
  private String link;
  
  private String color;
  
  private String image;
  
  private String keywords;
  
  private String description;
  
  private Integer weight;
  
  private Date weightDate;
  
  private String hits;
  
  private String posid;
  
  private String customContentView;
  
  private String content;
  
  private Date pushDate;
  
  private TTenant tenant;
  
  private String tenantName;
  
  private TArticleType tArticleType;
  
  private String typeName;
  
  private List<TArticle> articleList;
  
  public TArticle() {}
  
  public TArticle(String id) {
    super(id);
  }
  
  @NotNull(message = "租户id不能为空")
  public Integer getTenantId() {
    return this.tenantId;
  }
  
  public void setTenantId(Integer tenantId) {
    this.tenantId = tenantId;
  }
  
  public Integer getType() {
    return this.type;
  }
  
  public void setType(Integer type) {
    this.type = type;
  }
  
  @Length(min = 1, max = 255, message = "标题长度必须介于 1 和 255 之间")
  public String getTitle() {
    return this.title;
  }
  
  public void setTitle(String title) {
    this.title = title;
  }
  
  @Length(min = 0, max = 255, message = "文章链接长度必须介于 0 和 255 之间")
  public String getLink() {
    return this.link;
  }
  
  public void setLink(String link) {
    this.link = link;
  }
  
  @Length(min = 0, max = 50, message = "标题颜色长度必须介于 0 和 50 之间")
  public String getColor() {
    return this.color;
  }
  
  public void setColor(String color) {
    this.color = color;
  }
  
  @Length(min = 0, max = 255, message = "文章图片长度必须介于 0 和 255 之间")
  public String getImage() {
    return this.image;
  }
  
  public void setImage(String image) {
    this.image = image;
  }
  
  @Length(min = 0, max = 255, message = "关键字长度必须介于 0 和 255 之间")
  public String getKeywords() {
    return this.keywords;
  }
  
  public void setKeywords(String keywords) {
    this.keywords = keywords;
  }
  
  @Length(min = 0, max = 255, message = "描述、摘要长度必须介于 0 和 255 之间")
  public String getDescription() {
    return this.description;
  }
  
  public void setDescription(String description) {
    this.description = description;
  }
  
  public Integer getWeight() {
    return this.weight;
  }
  
  public void setWeight(Integer weight) {
    this.weight = weight;
  }
  
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  public Date getWeightDate() {
    return this.weightDate;
  }
  
  public void setWeightDate(Date weightDate) {
    this.weightDate = weightDate;
  }
  
  @Length(min = 0, max = 11, message = "点击数长度必须介于 0 和 11 之间")
  public String getHits() {
    return this.hits;
  }
  
  public void setHits(String hits) {
    this.hits = hits;
  }
  
  @Length(min = 0, max = 10, message = "推荐位，多选长度必须介于 0 和 10 之间")
  public String getPosid() {
    return this.posid;
  }
  
  public void setPosid(String posid) {
    this.posid = posid;
  }
  
  @Length(min = 0, max = 255, message = "自定义内容视图长度必须介于 0 和 255 之间")
  public String getCustomContentView() {
    return this.customContentView;
  }
  
  public void setCustomContentView(String customContentView) {
    this.customContentView = customContentView;
  }
  
  public String getContent() {
    return this.content;
  }
  
  public void setContent(String content) {
    this.content = content;
  }
  
  public TTenant getTenant() {
    return this.tenant;
  }
  
  public void setTenant(TTenant tenant) {
    this.tenant = tenant;
  }
  
  public String getTenantName() {
    return this.tenantName;
  }
  
  public void setTenantName(String tenantName) {
    this.tenantName = tenantName;
  }
  
  public TArticleType gettArticleType() {
    return this.tArticleType;
  }
  
  public void settArticleType(TArticleType tArticleType) {
    this.tArticleType = tArticleType;
  }
  
  public String getTypeName() {
    return this.typeName;
  }
  
  public void setTypeName(String typeName) {
    this.typeName = typeName;
  }
  
  public List<TArticle> getArticleList() {
    return this.articleList;
  }
  
  public void setArticleList(List<TArticle> articleList) {
    this.articleList = articleList;
  }
  
  @NotNull(message = "发布不能为空")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  public Date getPushDate() {
    return this.pushDate;
  }
  
  public void setPushDate(Date pushDate) {
    this.pushDate = pushDate;
  }
}
